package routers

import (
	"github.com/gin-gonic/gin"
	"hc_server/middleware/jwt"
	"hc_server/routers/api/v1/agentV1"
	agentRouter2 "hc_server/routers/router/agentRouter"
)

func AgentRouter(router *gin.RouterGroup) {
	router.POST("/login", agentV1.AgentLogin)                          //代理商登录
	router.POST("/register", agentV1.AgentRegister)                    //代理商注册
	router.POST("/register/getCode", agentV1.CodeGetAgentRegisterCode) //代理商注册获取验证码
	router.Use(jwt.JWT())

	router.POST("/home", agentV1.AgentHome)                                   //首页
	router.POST("/data", agentV1.AgentData)                                   //数据
	agentRouter2.MerchantRouter(router.Group("/merchant"))                    //商户路由
	agentRouter2.SalesmenRouter(router.Group("/salesmen"))                    //业务员
	agentRouter2.MerchantManagerRouter(router.Group("/merchantManage"))       //商户管理
	agentRouter2.DeviceRouter(router.Group("/device"))                        //设备
	agentRouter2.TeamManagerRouter(router.Group("/teamManage"))               //团队管理
	agentRouter2.SpecialIndustryRouter(router.Group("/specialIndustry"))      //特殊行业
	agentRouter2.TransactionManagerRouter(router.Group("/transactionManage")) //交易管理
	agentRouter2.IncomeRouter(router.Group("/income"))                        //收益
	agentRouter2.MyRouter(router.Group("/my"))                                //我的
	agentRouter2.WalletRouter(router.Group("/wallet"))                        //钱包

	router.POST("/merchant/agentList", agentV1.AgentMerchantAgentList) //商户入驻获取下属代理商
}
